import { SearchOutlined } from '@ant-design/icons'
import {Button, Table} from 'antd'
import Child from '@comps/Child'

export default function App() {

  const handleClick = () => {
    alert('---')
  }

  const dataSource = [
    {
      key: '1',
      name: '胡彦斌',
      age: 32,
      address: '西湖区湖底公园1号',
    },
    {
      key: '2',
      name: '胡彦祖',
      age: 42,
      address: '西湖区湖底公园1号',
    },
  ];
  
  const columns = [
    {
      title: '姓名', // 列标题
      dataIndex: 'name', // 取数据对象的哪个属性名的值
    },
    {
      title: '年龄',
      dataIndex: 'age',
    },
    {
      title: '住址',
      dataIndex: 'address',
    },
  ];

  return (
    <div style={{margin: 20}}>
      <Button>默认按钮</Button>
      <Button type='primary' onClick={handleClick}>基本按钮3</Button>
      <Button type="primary" icon={<SearchOutlined/>}>Search</Button>
      <Button size='small' icon={<SearchOutlined/>} shape="round"></Button>

      <Table dataSource={dataSource} columns={columns} />

      <Child/>
    </div>
  )
}
